package name.marz.to.go.ahg.mhbk.gui;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.Insets;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;

@Deprecated
public class SecretQAPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private JTextField textAnswer;
	private JLabel labelQuestion;
	
	public JTextField getTextAnswer() {
		return textAnswer;
	}
	
	public SecretQAPanel(String question) {
		// タイトルパネルの生成
		JPanel titlePanel = new WizardTitlePanel("端末未登録ゆえ合言葉が必要じゃ");
		
		// コンテンツパネルの生成
		JPanel contentPanel = createContentPanel(question);
		contentPanel.setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
        
		setLayout(new BorderLayout());
		
		add(titlePanel, BorderLayout.NORTH);
		JPanel secondaryPanel = new JPanel();
		secondaryPanel.add(contentPanel, BorderLayout.NORTH);
		add(secondaryPanel, BorderLayout.WEST);
    }
    
	private JPanel createContentPanel(String question) {
		JPanel contentPanel = new JPanel();
		JLabel blankSpace = new JLabel();
		contentPanel.setLayout(new BorderLayout());
		
		labelQuestion = new JLabel();
		labelQuestion.setText("質問："+question);
		contentPanel.add(labelQuestion, BorderLayout.NORTH);
		textAnswer = new JTextField();
		contentPanel.add(textAnswer, BorderLayout.SOUTH);
		
		contentPanel.setLayout(new GridLayout(0, 1));
		contentPanel.add(blankSpace);
		
		return contentPanel;
	}

}
